#!/usr/bin/sh

. $HOME/.local/bin/colors.sh # source colorscheme
. $HOME/.config/river/autoload
. $HOME/.config/river/bindings
. $HOME/.config/river/modes

# # input
riverctl set-repeat 40 250
riverctl hide-cursor timeout 3000
riverctl hide-cursor when-typing enabled
riverctl focus-follows-cursor normal

# border
riverctl border-color-focused 0x427b58ff
riverctl border-width 1

for i in $(riverctl list-inputs | grep -i touch); do
  riverctl input "$i" tap disabled
done

## border
riverctl border-width 0
#
# &>/dev/null is a BASH syntax
command -v rivercarro >/dev/null 2>&1 && tiler="rivercarro" || tiler="rivertile"

## 布局
if command -v rivercarro >/dev/null 2>&1; then # &>/dev/null is a BASH syntax
  riverctl default-layout rivercarro
  rivercarro -per-tag -no-smart-gaps -inner-gaps 0 -outer-gaps 0 -main-ratio 0.55 &
else
  riverctl default-layout rivertile
  rivertile -view-padding 0 -outer-padding 0 -main-ratio 0.55 &
fi
